package com.skplanet.oneplusonewindow.moimserver.dto;

public class CalDTO {
	
	private int fnum;
	private String cal;
	private int lnum;
	private String result;
	
	public int getFnum() {
		return fnum;
	}

	public void setFnum(int fnum) {
		this.fnum = fnum;
	}

	public String getCal() {
		return cal;
	}

	public void setCal(String cal) {
		this.cal = cal;
	}

	public int getLnum() {
		return lnum;
	}

	public void setLnum(int lnum) {
		this.lnum = lnum;
	}

	public String getResult() {
		if(cal == null) 
			return "";
//		switch(cal) {
//		case "+":
//			result = new String(fnum + " + " + lnum + " = " + (fnum+lnum));
//			break;
//		case "-":
//			result = new String(fnum + " - " + lnum + " = " + (fnum-lnum));
//			break;
//		case "*":
//			result = new String(fnum + " * " + lnum + " = " + (fnum*lnum));
//			break;
//		case "/":
//			if(lnum == 0)
//				result = "0으로 나눌 수 없습니다.";
//			else
//				result = new String(fnum + " / " + lnum + " = " + (fnum/lnum));
//			break;
//		}

		return result;
	}
}
